#ifndef IMPORT_THREAD_H
#define IMPORT_THREAD_H

#include <cstdint>
#include <QThread>

enum ImportHandleStatus : uint8_t
{
    Finished = 0,
    UpdateLabel = 1,
    UpdateProcess = 2,
    UpdateLabelAndPrcess = 3,
    FileNotExists = 4,
    FileCannotOpen = 5,
    FileVerificationFailed = 6
};

class ImportThread : public QThread
{
Q_OBJECT
public:
    ImportThread(QString zipPath);
    ~ImportThread() override;
    void run() override;
    void Cancel();
signals:
    void handle(ImportHandleStatus status, int process, QString text);
private:
    QString zipPath;
    bool cancel = false;
};

#endif // IMPORT_THREAD_H
